Skip to content

Conversation

@rodrigopavezi
Copy link
Member

@rodrigopavezi rodrigopavezi commented Feb 11, 2026

Description of the changes

Upgraded CircleCI resource classes from large to xlarge for the test-unit and integration test jobs, and added an xlarge resource class to the third test job to improve test execution performance.

Summary by CodeRabbit

  • Chores

    • Increased CI job resource allocation to speed up and stabilize test runs.
  • Tests

    • Made integration tests resilient to external service outages by detecting availability and skipping affected tests and cleanup when unreachable.
    • Increased test timeouts to allow longer-running asynchronous operations and reduce flaky failures.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Walkthrough

CircleCI job resource allocations increased to xlarge; Lit Protocol integration tests now detect Lit network availability and skip/adjust cleanup when unreachable; several request-client.js tests had Jest timeouts increased to 180000 ms.

Changes

Cohort / File(s) Summary
CircleCI Configuration
.circleci/config.yml
Updated resource_class values: changed test-unit and test-integration-with-request-node from large to xlarge, and added resource_class: xlarge for test-nightly. No workflow/steps logic changed.
Integration Tests (Lit Protocol)
packages/integration-test/test/lit-protocol.test.ts
Added litNetworkAvailable flag and skipIfNoLitNetwork helper; wrapped litProvider.initializeClient() in try/catch, set flag on failure, log warning, early-return/skip tests when network unreachable, and conditionally attempt cleanup in afterAll. No public API changes.
Request-client.js Tests (Jest timeouts)
packages/request-client.js/test/index.test.ts
Increased global Jest timeout and multiple individual test timeouts from shorter values (15–60s) to 180000 ms to allow longer async operations. No test logic changes.

Sequence Diagram(s)

mermaid
sequenceDiagram
autonumber
participant TestRunner as Test Runner
participant LitProvider as Lit Provider Client
participant LitNetwork as Lit Network
rect rgba(100,149,237,0.5)
TestRunner->>LitProvider: initializeClient()
LitProvider->>LitNetwork: connect / handshake
alt connection succeeds
LitNetwork-->>LitProvider: success
LitProvider-->>TestRunner: initialized
TestRunner->>TestRunner: run gated tests (encrypt/decrypt, requests)
TestRunner->>LitProvider: perform cleanup
LitProvider->>LitNetwork: cleanup calls
else connection fails
LitNetwork-->>LitProvider: error/timeout
LitProvider-->>TestRunner: throw / return failure
TestRunner->>TestRunner: set litNetworkAvailable = false
TestRunner->>TestRunner: skip gated tests
TestRunner->>LitProvider: attempt conditional cleanup (no-op if uninitialized)
end
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: upgrading CircleCI resource classes to xlarge, which is the primary focus of the .circleci/config.yml changes.
Description check ✅ Passed The description provides clear explanation of the changes, covering upgraded resource classes for test jobs and the objective of improving test execution performance, matching the template requirement.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR improves CI/CD performance and test reliability by upgrading CircleCI job resources and addressing test flakiness. The changes include:

  • CircleCI Configuration: Upgraded resource class from large to xlarge for test-unit and two integration test jobs, providing more CPU and memory for faster test execution
  • Lit Protocol Integration Tests: Implemented network availability detection with graceful test skipping when the external Lit Protocol network (datil-dev) is unreachable, preventing test failures due to external service outages
  • Request Client Tests: Extended test timeouts from 15-60 seconds to 180 seconds to accommodate longer-running asynchronous operations

All changes are defensive improvements that make the CI pipeline more stable and performant without affecting production code.

Confidence Score: 5/5

  • This PR is safe to merge with no risks identified
  • All changes are limited to CI configuration and test infrastructure. The resource class upgrades are straightforward and won't negatively impact functionality. The test resilience improvements (network availability checks and timeout extensions) follow best practices for handling external dependencies and async operations. No production code is modified.
  • No files require special attention

Important Files Changed

Filename Overview
.circleci/config.yml Upgraded resource class from large to xlarge for three test jobs to improve performance
packages/integration-test/test/lit-protocol.test.ts Added network availability detection with graceful test skipping when Lit Protocol network is unreachable
packages/request-client.js/test/index.test.ts Extended test timeouts from 15-60s to 180s for async operations to reduce flakiness

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@MantisClone
Copy link
Member

@greptile review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants